package com.sky.mapper;

import com.sky.entity.ServiceSkill;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ServiceSkillMapper {

    /**
     * 批量插入服务技能数据
     * @param skills
     */
    void insertBatch(List<ServiceSkill> skills);

    /**
     * 根据服务人员id删除服务技能数据
     * @param providerId
     */
    @Delete("delete from service_skill where provider_id = #{providerId}")
    void deleteByProviderId(Long providerId);

    /**
     * 根据服务人员id批量删除服务技能数据
     * @param providerIds
     */
    void deleteByProviderIds(List<Long> providerIds);

    /**
     * 根据服务人员id查询服务技能数据
     * @param providerId
     * @return
     */
    @Select("select * from service_skill where provider_id = #{providerId}")
    List<ServiceSkill> getByProviderId(Long providerId);
} 